summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgather.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gather.py b/gather.py
index d4beec6..2992ae0 100755
--- a/gather.py
+++ b/gather.py
@@ -73,7 +73,7 @@ try:
acsm_id = force_acsm_id
force_acsm_id = 0
else:
- borrow = session.scalars(select(Borrow).order_by(Borrow.id.desc())).first()
+ borrow = session.scalars(select(Borrow).order_by(Borrow.id.desc()).limit(1)).first()
acsm_id = starting_acsm_id
if borrow is None:
logger.info(f"oooh, it looks like this is a fresh start, db contains no borrows. I'll start with hardcoded acsm id {starting_acsm_id}")